This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Only save pause timestamp if app is unlocked #20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
I have identified and addressed an issue related to the didChangeAppLifecycleState behavior when interacting with Face ID. During the 'unlockWithBiometrics' , didChangeAppLifecycleState receives an inactive/paused state. This led to the unintended triggering of the lockout duration check immediately after the Face ID authentication was completed.
There seems to be an inconsistnty in how often didChangeAppLifecycleState recieves this state.
The problematic sequence was as follows:
This behavior was not isolated to our app but was also observed in your example application.
To rectify this issue, I have modified the behavior to consider the app's lock status before storing the 'paused timestamp'. It is unnecessary to execute the lock duration check if the app is already in a locked state when it goes inactive.
I'm currently uncertain about how best to retreive the current lock status so i have made a slight change to lock_controller.dart. Happy to change this ofcourse.
Your feedback on this approach and its integration into the existing codebase would be greatly appreciated. Thank you for your attention to this matter.
Best regards,
Charlton Santana